/****************************** (C) COPYRIGHT 2016 RSEStudio ****************************
* File Name          : 
* Author             : RSES_Liyang
* Version            : V1.0.0
* Date               : 00-May-18
* Description        : 
*****************************************************************************************/

#ifndef __UI_H__
#define __UI_H__

/* Includes ----------------------------------------------------------------------------*/
#include "SGUI_Typedef.h"
#include "SGUI_Common.h"
#include "HMI_Engine.h"
/* Exported define ---------------------------------------------------------------------*/
#define		KEY_VALUE_NONE									(0x0000)
#define		KEY_VALUE_LIFT									(0x0100)
#define		KEY_VALUE_RIGHT									(0x0200)
#define		KEY_VALUE_UP									(0x0300)
#define		KEY_VALUE_DOWN									(0x0400)

#define		UI_SCREEN_ID_WELCOME							(1001)
#define 	UI_SCREEN_ID_TEST_VALUE							(1002)
#define 	UI_SCREEN_ID_Main_Parge							(1003)
#define 	UI_SCREEN_ID_CondStart							(1005)
#define 	UI_SCREEN_ID_Measure							(1007)
#define 	UI_SCREEN_ID_PowerOff							(1008)
#define 	UI_SCREEN_ID_Alarm								(1009)
#define 	UI_SCREEN_ID_OffCharge							(1010)
#define 	UI_SCREEN_ID_USBLink							(1011)
#define 	UI_SCREEN_ID_PreStart							(1012)

#define 	UI_SCREEN_ID_TCINSERT							(1100)

#define 	KEY_PW				1
#define 	KEY_UP				2
#define 	KEY_DOWN			3


/* Exported macro ----------------------------------------------------------------------*/
#define		EVENT_KEY_ID(CODE)								((CODE & 0x0F00)>>8)
#define 	EVENT_KEY_ACTION(CODE)							(CODE & 0x00FF)
#define		KEY_CODE_OPT(CODE)								(CODE & 0xF000)
/* Exported types ----------------------------------------------------------------------*/
typedef enum
{
	EVENT_ID_UNKNOW =				0,
	// User defined action type.
	EVENT_ID_KEY_PRESS,
	// User defined action above.
	EVENT_ID_SCREEN,
	EVENT_ID_MAX,
	EVENT_ID_USBLINK,
}EVENT_ID;

typedef enum
{
    EVENT_TYPE_ANY =				0,
    EVENT_TYPE_ACTION,
    EVENT_TYPE_DATA,
}EVENT_TYPE;

enum DEMO_PROC_ACTION_ID
{
    HMI_DEMO_PROC_NO_ACT =			0,
    HMI_DEMO_PROC_CONFIRM =			1,
    HMI_DEMO_PROC_CANCEL =			2,
};

typedef struct
{
	SGUI_UINT16		uiKeyValue;
}KEY_EVENT_DATA;

typedef struct
{
	SGUI_INT		iValue;
	SGUI_INT		iValue_1;
}DUMMY_DATA_EVENT_DATA;

typedef struct
{
	SGUI_INT		iValue;
}EVENT_DATA_SCREEN;

HMI_EVENT_TYPE_DECLARE(KEY_PRESS_EVENT, KEY_EVENT_DATA);
HMI_EVENT_TYPE_DECLARE(DATA_EVENT, DUMMY_DATA_EVENT_DATA);
HMI_EVENT_TYPE_DECLARE(EVENT_SRCEEN,SGUI_INT);
/* Exported constants ------------------------------------------------------------------*/
/* Exported functions ----------------------------------------------------------------- */
void UI_init(void);

//UI_MainPage

//UI_CondStart


#endif
/********************************(C)COPYRIGHT 2016 RSEStudio ****************************/
/*****************************************END OF FILE************************************/

